#
# Makefile to make the file libclientserver.a, containing
# connection.o and server.o
#

CXX		 = g++
#CXXFLAGS	 = -ggdb  -Wall -W -Werror -pedantic-errors
#CXXFLAGS	+= -Wmissing-braces -Wparentheses
# The following option cannot be used since some of the socket
# macros give warnings on "old-style-cast"
CXXFLAGS	+= 

SRCC	= $(src/)

SRC	= $(src/wildcard *.cc)

.PHONY: all clean src pdf

all: src pdf

# Create the library; ranlib is for Darwin and maybe other systems.
# Doesn't seem to do any damage on other systems.

src: 
	cd src; make

pdf:
	cd report; make
	

clean:
	$(RM) ./bin/*.o*
	cd report; make clean
	


%.d: %.cc
	@set -e; rm -f $@; \
	 $(CXX) -MM $(CPPFLAGS) $< > $@.$$$$; \
	 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	 rm -f $@.$$$$

include $(SRC:.cc=.d)
